
<HTML> <HEAD>   <META NAME="GENERATOR" CONTENT="Adobe PageMill 2.0 Mac">   <TITLE></TITLE> </HEAD> <BODY> <P><!--tag "txt preface"--></P> <P>TagMaster is a web development application with a very specific purpose: it has been designed to make repetitive web development tasks easy. Using your favorite graphics web layout program or text editing tools, TagMaster can churn out large dynamic websites in very little time and can handle tasks of unlimited scope. <BR> <BR> Beyond that, however, we've also included an extensive suite of ready-to-build templates for easy original web development with just a few menu selections. <BR> <BR> Although TagMaster certainly isn't for the web novice, it provides easy-to-use, reliable, and fast development tools to all web developers with a basic understanding of how web pages work. <BR> <BR> This book was published entirely with TagMaster for purposes of demonstrating TagMaster's use. If you'd like to look at the build files, database files, and templates used to publish this manual, go to the &quot;manual&quot; directory in the TagMaster directory on your hard drive. <BR> <BR> While we have designed TagMaster with a specific purpose in mind, you as the developer may find many uses not described or used in this manual, possibly even find uses not even related to the internet. TagMaster was designed to be as open-ended and language-efficient in accomplishing all repetitive text-management tasks as possible; and we're confident that you will be pleased at TagMaster's adherance to that creed. <!--/tag "txt preface"--><BR> <BR> <!--tag "txt sec 1.1.1"-->Using build files--the program files that TagMaster uses to build web sites--is a method of creating web sites very different from most web development methods. TagMaster was designed in the spirit that in developing web pages, the majority of the work consists of repetitive tasks that could be easily automated given the proper tools. TagMaster attempts to provide such tools. <BR> <BR> On its most basic level, TagMaster is a text automation tool. By providing commands and conditionals that manipulate text in an intelligent way, a developer can easily string together batches of text and intelligently alter that text in unlimited ways. This can be done without dealing with the specific structure of the surrounding text, and therefore reduces the possibility of errors and introduces an attractive consistency in working with web pages. <BR> <BR> Another feature of the Build file method of developing web sites is that the Build file provides a method of manipulating files that transcends the file itself. That is, if a particular repetitive task requires that a file be duplicated numerous times with only limited changes, the entire task may be performed within a single Build file, and repeated identically to each of the files. Further, if a basic format change must be implemented across an entire array of files, TagMaster can easily recreate files using the same data around new or updated templates. <!--/tag "txt sec 1.1.1"--><BR> <BR> <!--tag "txt sec 1.1.2"-->An important tool that TagMaster offers are the ability of tags to be nested within the html files with which it works. While files need not be html to work properly, nor need the tags be composed of html language, that is the default to which TagMaster applies its abilities. <BR> <BR> Tags act as markers within a file containing text (html being the chief example) to mark a place, a block of text, or both. When used, tags are invisible to the end user because they replaced by text as determined by the Build file. In template form, tags are usually minimal in their negative effects on the appearance of the remaining html. While there are different types of tags, all tags attempt to accomplish this by adhering to two important guidelines: remaining as short and concise as possible, and using invisible html comments when convenient (subject to user preference). <BR> <BR> There are two types of tags used in TagMaster: short tags, which are autonomous and visible markers within the text file; and wide tags, which group a selection of text and are invisible in html rendering of the original template files (by using html comments). Both are useful in different cases. Short tags, for instance, may be added to an html file at any point by simply typing the tag identifier in the text of the html. The tag may then be replaced when included into a file later on. Wide tags, contrarily, are composed of two parts: a start tag and an end tag. Everything after the start tag and before the end tag is considered a part of the tag. Like short tags, then, the text of the tag may be replaced when included into a file later on; but wide tags may also, unlike short tags, bring in the block of text contained within its body, or its body contents, and that text may be included independent of the rest of the text file. <!--/tag "txt sec 1.1.2"--><BR> <BR> <!--tag "txt sec 1.1.3"-->When TagMaster runs a Build file it runs the command on each line, one after the other, until the entire file has been run. There can only be one command on each line, and each different command performs a different task. <BR> <BR> Included commands available are: the new command, which creates a new web page file; the include command, which brings in text from another file to the current file; and the tag command, which changes text in included files. <BR> <BR> (For detailed description on how to use these commands, see 
 <A HREF=" ">Chapter 2, "Creating a website from templates"</A> 
 or for a quick reference of available commands and their function, refer to 
 <A HREF="appa.htm">Appendix A, "TagMaster Commands"</A> 
.) <!--/tag "txt sec 1.1.3"--><BR> <BR> <!--tag "txt sec 1.2.1"-->Creating a new file in TagMaster is the same as creating a file in most Windows programs. Simply select &quot;New Build File&quot; from the File Menu and a new window for your Build file script will appear. <BR> <BR> For the purposes of naming your file and setting the default directory in which your project will be contained (described further in the next paragraph), it's a good idea to save your new document using the &quot;Save As...&quot; command after creating a new document. The &quot;Save As...&quot; command is located in the File Menu. <BR> <BR> The default directory is the directory to which all file references are linked when using relative filenames. There are two types of file references in TagMaster: relative filenames and absolute filenames. Relative filenames are preferable because if you move an entire project to another disk, the Build file links will not become broken. For more information about relative filenames, refer to 
 <A HREF="sec2.2.4.htm">2.4, "Absolute vs. relative filenames"</A> 
 <!--/tag "txt sec 1.2.1"--><BR> <BR> <!--tag "txt sec 1.2.2"-->The file and edit menu are very like most other Windows programs. <BR> <BR> File menu: <BR> <BR> New Build file: <BR> Creates a new Build file <BR> <BR> Open Build file: <BR> Opens an existing Build file <BR> <BR> Close file: <BR> Closes the foremost window <BR> <BR> Save: <BR> Saves the file in the foremost window <BR> <BR> Save as...: <BR> Saves the current file as a new file with a new name <BR> <BR> Page setup...: <BR> Sets up printer preferences <BR> <BR> Print...: <BR> Prints the foremost window <BR> <BR> Exit: <BR> Exits TagMaster <BR> <BR> Edit menu: <BR> <BR> Undo: <BR> Reverses the last action <BR> <BR> Cut: <BR> Copies the currently selected text to the clipboard and deletes it from the screen <BR> <BR> Copy: <BR> Copies the currently selected text to the clipboard <BR> <BR> Paste: <BR> Copies the clipboard to the screen <BR> <BR> Clear: Deletes the currently selected text from the screen <BR> <BR> Select All: <BR> Selects all text in the window <BR> <BR> <BR> The Build and Command menus contain commands specifically related to build files. <BR> <BR> Build: <BR> <BR> Check Syntax: <BR> Reviews each line of the currently opened Build file to assure that the text resembles Build file commands. If there is an error, Check Syntax will report it. Otherwise, there will be no message at all. <BR> <BR> Run This Script: <BR> Runs the currently opened Build file. <BR> <BR> Command menu: <BR> <BR> Make a new file... <BR> Inserts a command to create a new file in the currently opened Build file. For more information about the new command, see 
 <A HREF="appa.htm">Appendix A, "TagMaster Commands"</A> 
. <BR> <BR> Include file... <BR> Inserts a command to include the contents of a file after the file being built. For more information about the include command, see 
 <A HREF="appa.htm">Appendix A, "TagMaster Commands"</A> 
. <BR> <BR> Include tag in file... <BR> Inserts a command to include the text between the long tag specified in the chosen file after the file being built. For more information about the include command, see 
 <A HREF="appa.htm">Appendix A, "TagMaster Commands"</A> 
. <BR> <BR> Replace tag in file... <BR> Inserts a command to replace the text between and composing the specified tag in the file being built. For more information about the tag command, see 
 <A HREF="appa.htm">Appendix A, "TagMaster Commands"</A> 
. <BR> <BR> Nest in tag <BR> Converts an unnested tag into a nested tag. For more information about nested and unnested tags, see 
 <A HREF="appa.htm">Appendix A, "TagMaster Commands"</A> 
. <BR> <BR> De-nest a tag <BR> Converts an nested tag into an unnested tag. For more information about nested and unnested tags, see 
 <A HREF="appa.htm">Appendix A, "TagMaster Commands"</A> 
. <BR> <BR> Run another Build file... <BR> Inserts a command to run the specified Build file in its entirety before continuing to run the current Build file. For more information about the run command, see 
 <A HREF="appa.htm">Appendix A, "TagMaster Commands"</A> 
. <!--/tag "txt sec 1.2.2"--><BR> <BR> <!--tag "txt sec 1.2.3"--><BR> <BR> General: <BR> <BR> The general pane of the preferences window contains all preferences related to the TagMaster Build file scripting language. <BR> <BR> Short tag: <BR> <BR> The start and end text boxes for the short tag (see 
 <A HREF="appa.htm">Appendix A, "TagMaster Commands"</A> 
 for more information on short tags) allow you to choose the type of short tag TagMaster will detect. This will apply to an entire project, spanning many build files. It is important that once you choose the format in which you will be adding tags in your html files, that you use that format consistently for later use. <BR> <BR> The Start text box defines the text that will occur before the tag name to represent the tag; and the End text box accordingly defines the text that will occur after the tag name. Consider the following example: in the tag named &quot;myTag&quot;, if the Start box contained % % (the default) and the End box also contained % %, then the short tag myTag would be represented in html by &quot;% %myTag% %&quot;. <BR> <BR> Wide tag: <BR> <BR> Wide tags (see 
 <A HREF="appa.htm">Appendix A, "TagMaster Commands"</A> 
 for more information on wide tags) are different than short tags in that they are composed of two different text parts in the html: the start tag and the end tag. The entire contents of the start tag, the end tag, and all consecutive text in between are considered part of a wide tag. The text between the start tag and the end tag (excluding the tag itself) is considered the contents of the tag, and can be used as such. <BR> <BR> In the preferences window, the start tag is represented by the start and end boxes at the left of the Wide tag box, while the end tag is presented by the start and end boxes at the right of the Wide tag box. <BR> <BR> In the default setting, both the start tag and end tag are html comments. Thus the text before the name of the wide tag in the start tag is a standard html comment format: <TT>&lt;!--tag &quot;</TT>. The text occuring after the name completes the standard comment tag with a <TT>&quot;--&gt;.</TT> The end tag is similarly structured, except that instead of <TT>&lt;!--tag &quot;</TT>, the start of the end tag is represented by <TT>&lt;!--/tag &quot;</TT>, with a forward slash in front of the tag descriptor. <BR> <BR> Use relative filenames: <BR> <BR> The use of relative filenames is described in detail later on (see 
 <A HREF="sec2.2.4.htm">2.4, "Absolute vs. relative filenames"</A> 
). The &quot;Use Relative Filenames&quot; preference allows you to direct TagMaster to use relative filenames whenever possible, or not use them at all. If the box is unchecked, then even if TagMaster has the ability to use relative filenames, it will not. Otherwise, relative filenames will be used in all cases after the file is saved. If the file is not yet saved on disk, however, relative filenames can never be used. <BR> <BR> Treat first record as field names: <BR> <BR> The use of databases with TagMaster is described in detail in Chapter 3. The &quot;Treat first record as field names&quot; preference allows you to refer to a field in a database by its name instead of the order that it is listed in the file. After this option is selected, however, the first record in the database will not be considered part of the data, and will not be used in loops involving the database. <BR> <BR> Indent preferences: <BR> <BR> TagMaster automatically indents text while you are composing your Build file. This preference allows you to define how your text will be indented. The default is two spaces, which means two spaces for each indent. Also available are: 1 space, 3 spaces, 1 tab, or 2 tabs. <BR> <BR> Font: <BR> This pane allows you to set the type face and size of the text of the Build file. To restore the text to its defaults, click the &quot;Restore Defaults&quot; button. <BR> <BR> Colors: <BR> You can choose different styles and colors for different types of text in your Build file. Comments, or text occuring on a line after a double hyphen &quot;--&quot;, for instance, could be made italics and green. Strings, or blocks of text occuring between quotes, are by default colored red, but could be made bold and blue. Reserved words, like &quot;tag&quot; or &quot;include&quot; or &quot;new&quot; may also have their own characteristics. To return the text to its defaults, click the &quot;Restore Defaults&quot; button. <!--/tag "txt sec 1.2.3"--><BR> <BR> <!--tag "txt sec 1.2.4"-->To run your Build file, select &quot;Run this script&quot; from the Build menu, or type F9 while the Build file's window is on the screen. This will begin the run process on the Build file that you created. <BR> <BR> Before running a Build file, TagMaster will automatically check the syntax of your Build file. You can also check the syntax of a Build file yourself by selected &quot;Check Syntax&quot; from the Build menu. <BR> <BR> Syntax checking makes certain that the commands in the Build file are all valid commands. It works from the first line down, and will stop checking for errors once it finds one. If there is an invalid command, the syntax checker will bring up a dialog describing the general error that it found along with the line number on which the problem was discovered. The problem must then be corrected by the user. <BR> <BR> Once the problem is corrected, the user may attempt to run the program again. If there are no errors to be found, the syntax checker will return nothing and run the program. <BR> <BR> NOTE: Syntax checking does not confirm that filenames are valid. Invalid filenames will create runtime errors--errors that occur while the program is running. <BR> <BR> <!--/tag "txt sec 1.2.4"--><BR> <BR> <!--tag "txt sec 2.1.1"-->The most important step in designing your template pages is to create a single sample page that includes all of the features that you would like to include in the template. You can create this page in any editor, and the result should be how you would like all of your pages to look. By including all or most of the different features that you would like to include on web pages using the template, you can see how the features integrate together. <BR> <BR> By using this sample page to set up your template, template alterations will be very easy. Instead of dealing with the html code directly, simply making a change in the original template will create changes that ripple throughout all the webpages using that template. Using TagMaster this is very simple to accomplish, and is described in further detail in this section. <!--/tag "txt sec 2.1.1"--><!--tag "txt sec 2.1.2"-->It's important to remember while you're designing your template page that when you apply your data to the template different parts of the template are liable to change in appearance. Large amounts of text on a small screen, for instance, may be narrowed and extend very far down on the webpage. Oversized pictures may push text off screen or make tables bigger than expected, and unexpected picture overlaps may occur as a result of unforeseen space crunches. <BR> <BR> Even if there are problems with the template page, however, they may be easily corrected once the template is complete. <!--/tag "txt sec 2.1.2"--><BR> <BR> <!--tag "txt sec 2.1.3"-->There are two types of tags in TagMaster, and both are described in detail in 
 <A HREF="sec2.1.4.htm">1.4, "Wide and short tags"</A> 
. You can only use wide tags for the purposes of segmenting the parts of your template, however. Wide tags are HTML comments composed of a start tag and an end tag. Although the format for these tags may be changed in the TagMaster preferences, the default format is <TT>&lt;!--tag &quot;tagname&quot;--&gt;</TT> for the start tag, and <TT>&lt;!--/tag &quot;tagname&quot;--&gt;</TT> for the end tag. <BR> <BR> By placing a start tag at the beginning of each segmentable feature of your template page, and an end tag at the end of that same feature, that feature of the template may be easily addressed from within a Build file later on. <BR> <BR> An example of a segmentable feature is a table that lists upcoming events in the center of your webpage. The table itself and each line of that table are segmentable features. <BR> <BR> <TT>&lt;!--tag &quot;event table&quot;--&gt; <BR> &lt;TABLE&gt; <BR> &lt;!--tag &quot;new table row&quot;--&gt; <BR> &lt;TR&gt;&lt;TD&gt; <BR> <BR> &lt;TD&gt;&lt;/TR&gt; <BR> &lt;!--/tag &quot;new table row&quot;--&gt; <BR> &lt;/TABLE&gt; <BR> &lt;!--/tag &quot;event table&quot;--&gt; </TT><BR> <BR> This table, however, does not contain anything. In order to add the ability to alter the table's contents, another tag must be added. <BR> <BR> <TT>&lt;!--tag &quot;event table&quot;--&gt; <BR> &lt;TABLE&gt; <BR> &lt;!--tag &quot;new table row&quot;--&gt; <BR> &lt;TR&gt;&lt;TD&gt; <BR> &lt;!--tag &quot;contents&quot;--&gt; <BR> </TT>Your text here <BR> <TT>&lt;!--/tag &quot;contents&quot;--&gt; <BR> &lt;TD&gt;&lt;/TR&gt; <BR> &lt;!--/tag &quot;new table row&quot;--&gt; <BR> &lt;/TABLE&gt; <BR> &lt;!--/tag &quot;event table&quot;--&gt; <BR> </TT><BR> The tag &quot;contents&quot; in the above example will be used differently than the other two in the Build file. Instead of re-using data contained inside of the tag, the &quot;contents&quot; tag will be replaced. <!--/tag "txt sec 2.1.3"--></P> <P><!--tag "txt sec 2.1.4"-->There are two types of tags in html files that TagMaster can work with: wide tags and short tags. <BR> <BR> Wide tags, which are composed of both a start tag and an end tag, may have text within them. Wide tags are usually made up of html comments that may be used to pull out segments of text within the html, or replace entire segments within the file. Wide tags are useful when: </P> <OL>   <LI>A default text string located in the base html should appear if there   isn't a reason (and therefore, command in the Build file) to replace it;   <BR>      <LI>A string of text may need to be changed dynamically or used repeatedly;   or <BR>      <LI>The tags in the base html file should remain invisible (by being contained   in html comments). </OL> <P><BR> Examples of wide tags (these are the default tag layouts): <BR> <BR> <TT>&lt;html&gt; <BR> &lt;!--tag &quot;TAGNAME&quot;--&gt; <BR> </TT>The text within the tag TAGNAME <BR> <TT>&lt;!--/tag &quot;TAGNAME&quot;--&gt; <BR> &lt;/html&gt; <BR> </TT><BR> or <BR> <BR> <TT>&lt;html&gt; <BR> &lt;!--tag &quot;FORM BODY&quot;--&gt; &lt;!--tag &quot;TABLE BODY&quot;--&gt; <BR> ... &lt;!-- text or tags involving the table --&gt; <BR> &lt;!--/tag &quot;TABLE BODY&quot;--&gt; <BR> ... &lt;!-- text or tags involving the form, but not the table --&gt; <BR> &lt;!--/tag &quot;FORM BODY&quot;--&gt; <BR> &lt;/html&gt; </TT><BR> <BR> <BR> <BR> Short tags are composed of only one tag. Short tags are especially useful in senarios where a certain value must be replaced before a result html file is complete. They may also be inserted into html using a standard graphics-based web page creation program without creating and placing html comments (as with wide tags). <BR> <BR> Example of a short tag (this is the default tag layout): <BR> <BR> <html>This website has been on the web for % % TAGNAME % % days.<BR> <BR> Using the example given in the previous subsection as a base, (see 
 <A HREF="sec2.1.3.htm">1.3, "Inserting tags in comments"</A> 
) the following example uses short tags along with wide tags to make template creation and management easier. <BR> <BR> <BR> <TT>&lt;!--tag &quot;event table&quot;--&gt; <BR> &lt;TABLE&gt; <BR> &lt;!--tag &quot;new table row&quot;--&gt; <BR> &lt;TR&gt;&lt;TD&gt; <BR> </TT>% % row contents % % <TT><BR> &lt;/TD&gt;&lt;/TR&gt; <BR> &lt;!--/tag &quot;new table row&quot;--&gt; <BR> &lt;/TABLE&gt; <BR> &lt;!--/tag &quot;event table&quot;--&gt; </TT><BR> <BR> The text &quot;% % row contents % %&quot; in the above example works just like the wide tags, except that it does not require a start and end tag and has no contents. The &quot;new table row&quot; and &quot;event table&quot; tags will be used for their contents in the end Build file, and the &quot;row contents&quot; tag will be replaced. <BR> <BR> <!--/tag "txt sec 2.1.4"--><BR> <BR> <!--tag "txt sec 2.2.1"-->New files are created by using the new command. The new command is very simple in that it only has one parameter: the name of the file. The file may be named using the standard absolute and relative file naming conventions described in 2.4 of this section (see 
 <A HREF="sec2.2.4.htm">2.4, "Absolute vs. relative filenames"</A> 
). <BR> <BR> All lines of Build file commands after the new command and up until the closing end new command will be included into the new file. <BR> <BR> Commands within the new command have limited scope. The data included and tagged within the new command and its end command is separate from the enclosing data. <!--/tag "txt sec 2.2.1"--><BR> <BR> <!--tag "txt sec 2.2.2"-->Once a file has been created, data may be added to it using the &quot;include&quot; command. The &quot;include&quot; command has two forms, and may be used in a file created by &quot;new&quot; command or in a nested tag command, described in 2.3 of this section (see 
 <A HREF="sec2.2.3.htm">2.3, "Replacing data"</A> 
). <BR> <BR> The primary form of the include command is the one parameter include. This command will take the file referenced by the first parameter and include it after the current data. <BR> <BR> The secondary form of the include command is the two parameter include. The parameters consist of both a filename, the first parameter, and a wide tagname within the file, the second parameter. This include command will go into the specified file, pull out all text within the first occurance of the wide tag specified in the second parameter, and include that data after the current data. <BR> <BR> The two parameter form of the include command is particularly useful for including bits and pieces of long copy or headers that aren't convenient to keep in database form, and for including features of a template as described in 1.3 of the previous section (see 
 <A HREF="sec2.1.3.htm">1.3, "Inserting tags in comments"</A> 
). By using this command form, you can keep your data modular. Modular data, in turn, is easy to change without unforeseen negative consequences. <BR> <BR> After including data in either form of the include command, the tags in the included data are available to the tag command for replacement. <!--/tag "txt sec 2.2.2"--></P> <P><!--tag "txt sec 2.2.3"--><BR> <BR> Certain data, called tags, included in a Build file may be replaced with other data within the Build file. The tag command allows you to do this. Tags may only be called after an included file has already been specified. <BR> <BR> There are two types of tag commands: The tag command with one parameter and the tag command with two parameters. Both tag commands perform basically the same task, but the nature of the second parameter changes between the two. In both types of tag command, the first parameter defines the tag upon which the command will be effective. <BR> <BR> In the tag command with two parameters, the second parameter defines the actual text that the tag referenced by the first command will be replaced with. <BR> <BR> The tag command works by finding all short and wide tags of the defined name, and replacing each of them with the referenced data. This is true of all files included into the Build file, and will repeat itself throughout the entire text of the file currently being built to all tag references not already replaced. <BR> <BR> In the tag command with one parameter, all lines of Build file commands after the one parameter tag command, and up until the closing end tag command will be included in the specified tag. In this way, tags may be as complex or simple as necessary. <BR> <BR> Commands within the two parameter tag command have limited scope. The data included and tagged within the two parameter tag command and its end command is separate from the enclosing data. <!--/tag "txt sec 2.2.3"--><BR> <BR> <!--tag "txt sec 2.2.4"--><BR> <BR> Relative filenames are a feature of TagMaster which allow you to define a path independent of the path in which it is located. That is, a file path name is defined relative to the default directory from which it is referenced. <BR> <BR> There are very few situations in which you would not want to use relative filenames. TagMaster defaults with the option on. If you do require that filenames are referenced by absolute filenames, keep in mind that you cannot change directory names or the disk on which the project is kept without disturbing the file links within the build files. <BR> <BR> TagMaster relative filenames use standard DOS conventions, but allow for Windows long filenames. For example, suppose you had the following group of files collected in directories as follows: <BR>  <BR> <TT>C:\New Project\ref1.htm <BR> C:\New Project\data\ref2.htm <BR> C:\New Project\working\main.bld <BR> C:\New Project\working\ref3.htm </TT> <BR> <BR> All file references occur inside build files. The only Build file in the file list above is <TT>&quot;main.bld&quot;</TT> on the third line. From <TT>&quot;main.bld&quot;</TT> files <TT>&quot;ref1.htm&quot;</TT>, <TT>&quot;ref2.htm&quot;</TT>, and <TT>&quot;ref3.htm&quot;</TT> may be referred to by absolute or relative filenames. The list above consists of the absolute filenames for each of the files. It begins with the device name, follows with a path, and ends with a file. <BR> <BR> Relative filenames work somewhat differently. The relative filename reference to <TT>&quot;C:\New Project\ref1.htm&quot;</TT> from <TT>&quot;C:\New Project\working\main.bld&quot;</TT> would be: <TT>&quot;..\ref1.htm&quot;</TT>; the reference to &quot;ref2.htm&quot; above would be: <TT>&quot;..\data\ref2.htm&quot;</TT>; and the reference to <TT>&quot;ref3.htm&quot;</TT> would be just <TT>&quot;ref3.htm&quot;</TT>. In this fashion, files related to the same project could sustain links whether or not the pathnames change or the project moves to another disk. <BR> <BR> To decipher a relative filename, simply insert the path of the file in which the relative filename is contained (the default directory) before the relative filename, and work from there. Remember that in DOS <TT>&quot;..&quot;</TT> becomes the directory in which the current directory is contained. <BR> <BR> <TT>Referring filename (RF): C:\New Project\working\main.bld <BR> Default directory (DD): C:\New Project\working\ <BR> <BR> Relative: ..\ref1.htm <BR> DD + RF : C:\New Project\working\..\ref1.htm <BR> Absolute: C:\New Project\ref1.htm <BR> <BR> Relative: ..\data\ref2.htm <BR> DD + RF : C:\New Project\working\..\data\ref2.htm <BR> Absolute: C:\New Project\data\ref2.htm <BR> <BR> Relative: ..\ref3.htm <BR> DD + RF : C:\New Project\working\..\ref3.htm <BR> Absolute: C:\New Project\working\ref3.htm <BR> <BR> Relative: part2\ref4.htm <BR> DD + RF : C:\New Project\working\part2\ref4.htm <BR> Absolute: C:\New Project\working\part2\ref4.htm </TT><BR>  <BR> When checked, the &quot;Use relative filenames&quot; preference (located in the &quot;General&quot; pane of the preferences) directs TagMaster to use relative filenames at all times unless the Build file is unsaved, and therefore has no default directory. If unchecked, the preference directs TagMaster to always use absolute filenames. <!--/tag "txt sec 2.2.4"--></P> <P><!--tag "txt sec 3.1.1"--><BR> <BR> The structure of your database will vary greatly with the type of website that you're creating. A product directory that creates a separate webpage for each product will need to name the files. If you are using Microsoft Access or FileMaker Pro, this may be in the form of a calculation. A filename may be a product number, or a variable specified uniquely for each product. Then, of course, all necessary data related to your product must be kept in the record. Prices (preformatted to look how they should on the website), descriptions, a link to a picture, or any other data you may come to need in the course of creating your website should all be included in the database. <BR> <BR> As mentioned with prices above, all data must be preformatted to text the way you would like it to appear on the website. Prices should be truncated to two decimal points, dates should be formatted to taste, as should any times or durations (the popular database programs will make this easy with commands that perform these tasks specifically). <BR> <BR> TagMaster cannot perform mathematical functions, so it's important that your database handle all of these functions in the correct way. TagMaster also cannot determine inequalities, such as greater than or less than, so if such devices are necessary in your end result, you must create database fields that perform these comparisons to handle these items. <!--/tag "txt sec 3.1.1"--></P> <P><!--tag "txt sec 3.1.2"-->TagMaster can currently read two database formats: the &quot;.csv&quot; or comma-separated values format; and the &quot;.tab&quot; or tab-separated values format. These formats may be used with the &quot;repeat command&quot;, and are only accessible in TagMaster through that command. <BR> <BR> By default, the first record in each database file is considered a dead record, and the data in each field of that record is considered the field name. These field names may be accessed using the record variable as described in detail in 2.1 of the following section (see 
 <A HREF="sec3.2.1.htm">2.1, "Accessing database records"</A> 
). <BR> <BR> This feature may be turned off by deselecting the &quot;Treat first record as field named&quot; preference on the preferences dialog. <BR> <BR> Example: <BR> <BR> <TT>&quot;first field&quot;,&quot;second field&quot; <BR> first field, second field <BR> &quot;first field&quot; [tab] &quot;second field&quot; <BR> first field [tab] second field <BR> <BR> <BR> </TT><B>Naming database fields </B><BR> <BR> You can name fields in a database for use in your Build file script. If the &quot;Treat first record as field names&quot; preference is set, database fields are named by the contents of that field in the first record of the database. If a record is used as field names, the record is ignored in the repeat loop. To find out more about accessing database fields, see 
 <A HREF="sec3.2.1.htm">2.1, "Accessing database records"</A> 
. <!--/tag "txt sec 3.1.2"--><BR> <BR> <!--tag "txt sec 3.2.1"-->Information from databases may be accessed as text or records. Data may only be included as text, however. Records fields are accessed using a colon after the record reference. The number that follows represents the number of the field that the text will be extracted from, or, if text, the name of the field that the text will be extracted from. To learn more about naming fields, see 
 <A HREF="sec3.1.2.htm">1.2, "Making your database Build file accessible"</A> 
. <BR> <BR> Example: <BR> <BR> <TT>repeat i &quot;database.csv&quot; <BR> include &quot;item.htm&quot; <BR> tag &quot;content&quot; i:1 <BR> tag &quot;more content&quot; i:&quot;name field&quot; <BR> end repeat </TT><BR> <BR> In the above example, the variable i represents the record. The reference to i:1 represents the first field of the record referenced by i. The reference to i:&quot;name field&quot; represents the field named &quot;name field&quot; of the record referenced by i. <!--/tag "txt sec 3.2.1"--><BR> <BR> <!--tag "txt sec 3.2.2"-->Files may be created from a database reference or variable the same way they are created from a data constant. A file is created at the path specified in the first parameter, regardless of the format this takes. Filenames passed to the new command may be either relative or absolute. (For more information about relative filenames see 
 <A HREF="sec2.2.4.htm">2.4, "Absolute vs. relative filenames"</A> 
.) <BR> <BR> Examples: <BR>  <BR> <TT>new i:&quot;newfilename&quot; <BR> new NewFileName <BR> new &quot;filename.htm&quot;</TT>  <!--/tag "txt sec 3.2.2"--><BR> <BR> <!--tag "txt sec 3.2.3"-->The repeat loop is one of the most powerful tools in TagMaster. By using the repeat loop, repetitive commands, such as lists, web pages from templates, or any task that uses the same data repeatedly, will become much simpler to change. <BR> <BR> Repeat loops are inherently tied to database files. These files may be edited in your favorite comma-separated values or tab-delimited fields file editor. Microsoft Excel is one of the more functional data editors. Other programs, such as Microsoft Access or FileMaker Pro provide even further automation features to make the creation of updated database files much easier to streamline for the web administrator. <BR> <BR> The repeat loop takes the form shown below, and uses the record variable as described in 2.1 of this section (see 
 <A HREF="sec3.2.1.htm">2.1, "Accessing database records"</A> 
). <BR> <BR> Example: <BR> <BR> <TT>repeat i &quot;database.csv&quot; <BR> include &quot;item.htm&quot; <BR> set thisContent i:1 <BR> if thisContent isnot &quot;&quot; then <BR> tag &quot;content&quot; thisContent <BR> end if <BR> end repeat </TT><!--/tag "txt sec 3.2.3"--><BR> <BR> <!--tag "txt sec 3.2.4"--><BR> <BR> Variables in TagMaster are scope-independent. That is, any variable defined in a Build file is then effective throughout any other build files run by the Build file that created the variable, or files that caused the creating Build file to run. All TagMaster variables are globals and hold whatever value was assigned to them last. <BR> <BR> With that in mind, it is important that, if running numerous build files at a time, you name your variables uniquely enough that loops or running values might not get confused. <BR> <BR> set variableName to thistext <BR> <BR> Variable names are no longer that 255 characters long, and may contain no more than 65,536 characters at a time. Also, for ease of use, variable names are case-independent. That means that you are free to change variable name capitalization from one use to another. <BR> <BR> Variables may be assigned any value, such as: <BR> <BR> database fields <BR> <BR> <TT>set myVariable i:1 </TT><BR> <BR> other variables <BR> <BR> <TT>set myVariable myData </TT><BR> <BR> strings <BR> <BR> <TT>set myVariable &quot;thisData&quot; </TT><!--/tag "txt sec 3.2.4"--></P> <P>&nbsp;</P> <P><!--tag "txt sec 3.2.5"-->A conditional compares two values and performs a portion of script based on the results of that comparison. There are two types of conditionals in TagMaster: is and isnot. Using the &quot;if&quot; command in correlation with one of these conditionals will result in the script following the if command to be run if the conditional is true, or the script following the else command to be run (if there is an &quot;else&quot; command) if the conditional is false. <BR> <BR> Example: <BR> <BR> <TT>if myFirstVariable is mySecondVariable then <BR> include &quot;ismatch.txt&quot; <BR> else <BR> include &quot;isnotmatch.txt&quot; <BR> end if <BR> <BR> if myVariable isnot &quot;&quot; then <BR> run &quot;continue.bld&quot; <BR> end if </TT><!--/tag "txt sec 3.2.5"--></P> <P><!--tag "txt app a"--><BR> <B><FONT SIZE=+1>repeat </FONT></B><BR> <BR> Example: <BR> <BR> <TT>repeat i &quot;database.csv&quot; <BR> end repeat </TT><BR> <BR> Repeats the commands between this command and its associated end repeat command for each record in &quot;database.csv&quot;. &quot;Database.csv&quot; can be the name of any database file. <BR> <BR> To learn about accessing database fields and records, see 
 <A HREF="sec3.2.1.htm">2.1, "Accessing database records"</A> 
.</P> <P><BR> <BR> <B><FONT SIZE=+1>if-else </FONT></B><BR> <BR> Example: <BR> <TELETYPE> <BR> if i is &quot;this text&quot; <BR> if i isnot &quot;this text&quot; <BR> else <BR> end if </TELETYPE> <BR> <BR> The commands between if and its associated else or end if are performed provided that the parameters are matching, in the case of &quot;is&quot;, or not matching, in the case of &quot;is not&quot;. The commands following else are performed otherwise, if there is an else. An if command must always be followed by an end if line. <BR> </P> <P><BR> <B><FONT SIZE=+1>tag </FONT></B><BR> <BR> Example: <BR> <BR> <TT>tag &quot;tag name&quot; &quot;text&quot; <BR> tag &quot;tag name&quot; <BR> end tag </TT><BR> <BR> If followed by one parameter: The tag referenced by the first parameter (&quot;tag name&quot; above) in the most recently included file is replaced with the text in the second parameter (&quot;text&quot; above). <BR> <BR> If followed by two parameters: The tag referenced by the first parameter (&quot;tag name&quot; above) in the most recently included file is replaced with the text included by commands performed between the tag command and its associated end tag command. <BR> <BR> <TT>tag &quot;tag name&quot; <BR> include &quot;text replacing tag name&quot; <BR> end tag </TT><BR> <BR> The tag command is automatically inserted when a file is included using the &quot;Include a file&quot; menu command. To change a tag command from an unnested tag (a tag with two parameters) to a nested command (a tag with one parameter), choose the &quot;Nest a tag&quot; from the Command menu. To change the tag back to an unnested tag (a tag with two parameters), choose &quot;De-nest a tag&quot; from the Command menu. <BR> </P> <P><BR> <B><FONT SIZE=+1>include </FONT></B><BR> <BR> Example: <BR> <BR> <TT>include &quot;filename.htm&quot; <BR> include &quot;filename.htm&quot; &quot;tag to include&quot; </TT><BR> <BR> If followed by one parameter: <BR> The file referenced by the first parameter (&quot;filename.htm&quot; above) is included after the currently being built file or tag. <BR> <BR> If followed by two parameters: <BR> The text in the long tag referenced by the second parameter of the file referenced by the first parameter (&quot;filename.htm&quot; above) is included after the currently being built file or tag. <BR> <BR> If the include is being performed within a nested tag, the text will be included as a part of the text replacing the tag. Otherwise, the text will simply be added to the end of the file. <BR> </P> <P><BR> <B><FONT SIZE=+1>run <BR> </FONT></B><BR> Example: <BR> <BR> <TT>run &quot;filename.bld&quot;</TT><BR> <BR> Runs the file referenced in the first parameter as though the text were in the current Build file in place of the run command. <BR> </P> <P><BR> <B><FONT SIZE=+1>set <BR> </FONT></B><BR> Example: <BR> <BR> <TT>set variable &quot;text&quot;</TT><BR> <BR> Sets the variable referenced in the first parameter to the object referenced by the second parameter. <BR> <BR> <BR> <B><FONT SIZE=+1>new</FONT></B><FONT SIZE=+1> </FONT><BR> <BR> Example: <BR> <BR> <TT>new &quot;filename.htm&quot;</TT> <BR> <BR> Creates a new file of the name listed in the first parameter. Once the file is created, text may then be included into the file. <!--/tag "txt app a"--></P> <P>&nbsp;</P> <P><!--tag "txt app b"--></P> <P>There are several dozen template pages, parts, and inserts included with TagMaster for use in your own projects. This is uncopyrighted html for your own business or personal uses. The pieces have all of the appropriate TagMaster tags to integrate simply into your project. These templates are available in the <TT>templates</TT> subdirectory of your TagMaster program directory.</P> <P>Templates are divided into three types: pages, parts, and inserts. The difference between these three is very simple. Pages have tags into which you can include parts and inserts, but may not be included into anything else. Parts have tags into which you can include parts and inserts, and unlike pages, may be themselves included into other parts. Inserts, like parts, may be included into pages or parts, however any tags within inserts should only be replaced with small strings of text or database data. Inserts usually cannot contain parts.</P> <P>Experiment with the templates and alter them in your favorite html editor as you see fit. If you create a particularly useful template and would like to share your creation with the internet community, feel free to submit your template for publication on our website. Likewise, if you're looking for layout ideas for a new project, feel free to review other customer templates on our website at <A HREF="http://www.dataczar.com/" TARGET="_blank">http://www.dataczar.com/</A>.<BR> <!--/tag "txt app b"--><BR> </P> <P><!--tag "txt app c"--><BR> There are several sample projects available to you in the <TT>samples</TT> subdirectory of your TagMaster program directory. These have been made available to you to speed your understanding of the TagMaster language.</P> <P>For more TagMaster samples or to submit a sample project of your own, stop by our website at <A HREF="http://www.dataczar.com/" TARGET="_blank">http://www.dataczar.com/</A>.<BR> <BR> <!--/tag "txt app c"--></P> <P><!--tag "txt app d"--><BR> <BR> <B>Wide tag -</B> A two part tag that may contain data or be replaced that consists of a start tag and an end tag, both contained in HTML comments by default. <BR> <BR> <B>Short tag</B> - A one part tag that may not contain data but may be replaced and may be included within HTML tags. <BR> <BR> <B>Start tag</B> - The beginning tag of the two part wide tag. <BR> <BR> <B>End Tag -</B> The end tag of the two part wide tag. <BR> <BR> <B>Included file -</B> A file that by reference through an include command has been included as data. <BR> <BR> <B>Tag</B> - A marker within data of an insert or extraction place, or a command for the replacement thereof.<BR>  <BR> <B>Replace</B> - The removal of existing data in favor of alternate data to take its place. <BR> <BR> <B>Nested tag</B> - A tag command with one parameter that allows the application of numerous commands to a single tag replacement command. <BR> <BR> <B>Unnested tag</B> - A tag command with two parameters that will replace a tag with that data contained in the second parameter. <BR> <BR> <B>comma-separated values file </B>- A file containing records separated by return characters, and fields in each record separated by commas. <BR> <BR> <B>csv file</B> - A comma-separated values file. <BR> <BR> <B>default directory -</B> The directory of the currently opened Build file. <BR> <BR> <B>syntax </B>- The proper organization of commands for use. <BR> <BR> <B>relative paths - </B>A path that is derived from the default directory. <BR> <BR> <B>absolute paths -</B> A path that is independent of the default directory. <BR> <BR> <B>html -</B> hyper text markup language <BR> <BR> <B>Hyper Text Markup Language </B>- The standard for composing web pages on the internet <BR> <BR> <B>body content </B>- The data contained in a web page. <BR> <BR> <B>data constant </B>- Data that is not contained in a variable. <!--/tag "txt app d"--></P> <P><!--tag "txt app e"-->Technical support, update notifications, and new TagMaster issues as they arise are available on the world wide web at our website: <A HREF="http://www.dataczar.com/" TARGET="_blank">http://www.dataczar.com/</A>. <!--/tag "txt app e"--> </BODY> </HTML>
